package rlex.classes;

import java.util.ArrayList;

public class Identifier {
	private String name;
	private String type;
	private ArrayList<Identifier> attriblist;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public ArrayList<Identifier> getAttriblist() {
		return attriblist;
	}
	public void setAttriblist(ArrayList<Identifier> attriblist) {
		this.attriblist = attriblist;
	}
	
	public void display() {
		System.out.print(name + ":" + type);
		if (type.equals(Token.PROCEDURE)) {
			System.out.print("(");
			for (int i = 0; i < attriblist.size(); i++) {
				attriblist.get(i).display();
				System.out.print(",");
			}
			System.out.print(")");
		}
	}
}
